package com.qumap.editview.gin;

import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.name.Names;
import com.qumap.item.test.TestItemFactory;
import com.qumap.map.IMapView;
import com.qumap.editmap.EditMap;
import com.qumap.editmap.EditMapView;
import com.qumap.common.edit.IDisplay;
import com.qumap.editview.impl.DisplayImpl;
import com.qumap.editview.impl.DisplayTestMap;
import com.qumap.edititem.EditItemDisplay;
import com.qumap.edititem.EditItemListFactory;
import com.qumap.edititem.IItemEditArea;
import com.qumap.edititem.impl.IEA;


/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 05.05.11
 * Time: 17:58
 * To change this template use File | Settings | File Templates.
 */
public class EditViewClientModule extends AbstractGinModule {

	public static final String MAP_DISPLAY = "MAP";
	public static final String ACCOUNT_DISPLAY = "ACCOUNT";
	public static final String ITEM_DISPLAY = "ITEM";

	@Override
	protected void configure() {
		bind(IMapView.class).to(EditMapView.class);
		bind(IDisplay.class).to(DisplayImpl.class);
		bind(EditItemListFactory.class).to(TestItemFactory.class);
		bind(IItemEditArea.class).to(IEA.class);
		bind(IDisplay.class).annotatedWith(Names.named(MAP_DISPLAY)).to(EditMap.class);
		bind(IDisplay.class).annotatedWith(Names.named(ACCOUNT_DISPLAY)).to(DisplayTestMap.class);
		bind(IDisplay.class).annotatedWith(Names.named(ITEM_DISPLAY)).to(EditItemDisplay.class);
	}
}
